/**
 * This function fades the navigation links when scrolling 
 * between the main div and content div of index.html
 *
 ***************************************************************
 *  Example
 **************************************************************
 *  // attach fading navigation to window scroll event
 *  $( window ).scroll( nav_fade_anim );
 **************************************************************
 * @author nicholas malacarne <nicholas.malacarne@gmail.com>
 */
function nav_fade_anim(){

    if ( ( $(window).scrollTop() / $(document).height() ) > 0.46 ){
        
        $( "#navbar a" ).css( "color", "#2d3349" );
        
        $( "#navbar a" ).mouseenter( function() {
            
        	$(this).css( "color", "#7cb4de" );

        }).mouseleave( function() {
            
        	$(this).css( "color", "#2d3349" );
        });
        
    }else{
        
        $( "#navbar a" ).css( "color", "" );
        
        $( "#navbar a" ).mouseenter( function() {
            
        	$(this).css( "color", "#7cb4de" );
        	
        }).mouseleave( function() {
            
        	$(this).css( "color", "#fff" );
        });
    }
}